package com.crm.system.service.impl.returnMoney;

import com.crm.common.model.DhPageInfo;
import com.crm.model.qo.returnMoney.RmExamineRecordQO;
import com.crm.model.vo.returnMoney.RmExamineRecordVO;
import com.crm.service.returnMoney.RmExamineRecordDbService;
import com.crm.system.service.returnMoney.RmExamineRecordService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

@Service
@Slf4j
public class RmExamineRecordServiceImpl implements RmExamineRecordService {

    @Autowired
    private RmExamineRecordDbService rmExamineRecordDbService;

    @Override
    public DhPageInfo<RmExamineRecordVO> selectPageList(Integer pageIndex, Integer pageSize, RmExamineRecordQO rmExamineRecordQO) {
        if (pageIndex != null && pageSize != null) {
            PageHelper.startPage(pageIndex, pageSize);
        }
        List<RmExamineRecordVO> list = rmExamineRecordDbService.selectList(rmExamineRecordQO);
        PageInfo<RmExamineRecordVO> pageInfo=new PageInfo<>(list);
        return new DhPageInfo<RmExamineRecordVO>(pageInfo,list);
    }
}